export const tableOption = {
  border: true,
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  viewBtn: true,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  column: [{
    label: '创建时间',
    searchType: 'datetimerange',
    searchSpan: 10,
    search: true,
    prop: 'create_time',
  },{
    label: '订单号',
    search: true,
    prop: 'order_no',
  }, {
    label: '域名',
    search: true,
    prop: 'domain',
  },{
    label: '价格',
    prop: 'price_search',
    type: "select",
    hide: true,
    viewDisplay: false,
    dicFlag: true,
    searchFilterable: true,
    search: true,
    dicUrl: process.env.VUE_APP_BASE_API + "/admin/dict/find?type=order_money",
    dicFormatter: res => {
      return (res.data || []).map(o => ({
        label: o.label,
        value: o.value
      }));
    },
    props: {
      label: "label",
      value: "value"
    },
    rules: [{
      required: true,
      message: "请输入"
    }],
  }, {
    label: '售价',
    prop: 'price',
  }, {
    label: '回购价',
    prop: 'price_back'
  },{
    label: '回购周期',
    span: 24,
    prop: 'days'
  },{
    label: '回购时间',
    span: 24,
    prop: 'time'
  },{
    label: '管理费',
    prop: 'charge'
  },{
    label: '买家支付',
    prop: 'pay'
  }, {
    label: '卖家',
    search: true,
    prop: 'sell_name'
  },{
    label: '买家',
    prop: 'buy_name'
  },{
    label: '定向Id',
    hide: true,
    prop: 'target',
  }, {
    label: '订单状态',
    prop: 'status',
    type: "radio",
    search: true,
    span: 24,
    dicUrl: process.env.VUE_APP_BASE_API + "/api/status",
    dicFormatter: res => {
      return (res.data || []).map(o => ({
        label: o.label,
        value: o.value
      }));
    },
  } ]
}



export const tableOptionAudit = {
  border: true,
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  viewBtn: false,
  addBtn: false,
  menuWidth: 300,
  editBtn: false,
  delBtn: false,
  column: [{
    label: '创建时间',
    searchType: 'datetimerange',
    searchSpan: 10,
    search: true,
    editDisplay: false,
    prop: 'create_time',
  }, {
    label: '域名',
    detail: true,
    prop: 'domain',
  },{
    label: '价格',
    editDisplay: false,
    prop: 'price_search',
    type: "select",
    hide: true,
    dicFlag: true,
    searchFilterable: true,
    search: true,
    dicUrl: process.env.VUE_APP_BASE_API + "/admin/dict/find?type=order_money",
    dicFormatter: res => {
      return (res.data || []).map(o => ({
        label: o.label,
        value: o.value
      }));
    },
    props: {
      label: "label",
      value: "value"
    },
    rules: [{
      required: true,
      message: "请输入"
    }],
  }, {
    label: '售价',
    detail: true,
    prop: 'price',
  }, {
    label: '回购价',
    detail: true,
    prop: 'price_back'
  }, {
    label: '实收金额',
    detail: true,
    hide: true,
    prop: 'price_real'
  },{
    label: '管理费',
    detail: true,
    hide: true,
    prop: 'price_manage'
  },{
    label: '回购周期',
    detail: true,
    prop: 'days'
  },
  //  {
  //   label: '域名证书',
  //   prop: 'pics',
  //   span: 24,
  //   detail: true,
  //   addDisplay: false,
  //   type: 'upload',
  //   dataType: 'string',
  //   listType: 'picture-card',
  //   oss: 'qiniu',
  //   propsHttp: {
  //     name: 'hash',
  //     url: "key"
  //   }
  // },
  {
    label: '是否隐藏',
    detail: true,
    hide: true,
    prop: 'hide',
    type: "radio",
    dicData: [{
      label: '否',
      value: 0
    }, {
      label: '是',
      value: 1
    }],
  },{
    label: '定向',
    detail: true,
    hide: true,
    prop: 'target',
  },{
    label: '卖家ID',
    hide: true,
    detail: true,
    prop: 'user_id'
  },{
    label: '卖家姓名',
    hide: true,
    detail: true,
    prop: 'name',
  },{
    label: '卖家手机号',
    hide: true,
    detail: true,
    prop: 'phone',
  },{
    label: '交易描述',
    detail: true,
    hide: true,
    span: 24,
    prop: 'des',
  },
  // {
  //   label: '权限',
  //   hide: true,
  //   span: 24,
  //   prop: 'qx',
  //   type: "checkbox",
  //   dicData: [{
  //     label: '管理权限',
  //     value: '1'
  //   }, {
  //     label: '域名过户',
  //     value: '2'
  //   }],
  //   rules: [{
  //     required: true,
  //     message: "请输入"
  //   }],
  // },
]
}
